//
//  TableViewCell.m
//  KnowEveryThings
//
//  Created by lanou3g on 16/5/6.
//  Copyright © 2016年 王玲. All rights reserved.
//

#import "TableViewCell.h"
#import "UIImageView+WebCache.h"
@interface TableViewCell()
//图片
@property (weak, nonatomic) IBOutlet UIImageView *image;
//标题
@property (weak, nonatomic) IBOutlet UILabel *title;
//标签
@property (weak, nonatomic) IBOutlet UILabel *label;
@end
@implementation TableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(WLModel *)model{
    if (!_readModel) {
        _readModel = [[WLModel alloc] init];
    }
}

- (void)layoutSubviews{
    self.title.text = self.readModel.title;
    [self.image sd_setImageWithURL:[NSURL URLWithString:self.readModel.img] placeholderImage:[UIImage imageNamed:@"bj1.jpg"]];
    self.label.text = self.readModel.source;
}

@end
